<template>
  <el-card style="margin-bottom: 10px;">
    <div slot="header">
      <span><i class="fa-brands fa-java" /> Java虚拟机信息</span>
    </div>
    <div class="el-table w_100 el-table--fit el-table--striped el-table--border el-table--enable-row-hover el-table--enable-row-transition">
      <table cellspacing="0" style="width: 100%;table-layout:fixed;">
        <tbody>
          <tr>
            <td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
            <td class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.name }}</div></td>
            <td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
            <td class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.version }}</div></td>
          </tr>
          <tr>
            <td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
            <td class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.startTime }}</div></td>
            <td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
            <td class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.runTime }}</div></td>
          </tr>
          <tr>
            <td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
            <td colspan="3" class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.home }}</div></td>
          </tr>
          <tr>
            <td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
            <td colspan="3" class="el-table__cell is-leaf"><div v-if="sys" class="cell">{{ sys.userDir }}</div></td>
          </tr>
          <tr>
            <td colspan="1" class="el-table__cell is-leaf"><div class="cell">运行参数</div></td>
            <td colspan="3" class="el-table__cell is-leaf"><div v-if="jvm" class="cell">{{ jvm.inputArgs }}</div></td>
          </tr>
        </tbody>
      </table>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'Jvm',
  props: {
    jvm: {
      type: Object,
      default: () => {
        return {}
      }
    },
    sys: {
      type: Object,
      default: () => {
        return {}
      }
    }
  }
}
</script>

<style scoped lang="scss">

</style>
